package com.numbfish.start;

import org.junit.jupiter.api.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

abstract public class BaseTest2 {
    WebDriver driver;
    private void init(){
        System.setProperty("webdriver.chrome.driver", "./src/test/resources/chromedriver-mac-x64/chromedriver");
//        System.out.println(System.getProperty("webdriver.chrome.driver"));
        driver = new ChromeDriver();
    }

    @Test
    public void execute(){
        init();
        try {
            doExecute();
        }
        finally {
            driver.quit();
        }
    }

    abstract void doExecute();
}
